/*
 * @Author: nexox 2685853507@qq.com
 * @Date: 2024-11-26 10:11:20
 * @LastEditors: nexox 2685853507@qq.com
 * @LastEditTime: 2024-11-26 10:19:54
 * @FilePath: \pytorch_workplace\note\kt1.cpp
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include <stdio.h>
#include <string.h>

bool arePermutations(const char *s1, const char *s2) {
    int len1 = strlen(s1), len2 = strlen(s2);
    if (len1 != len2) return false;
    int h[300];
    memset(h, 0, sizeof(h));
    for (int i = 0; i < len1; i++) {
        h[s1[i]]++;
        h[s2[i]]--;
    }
    for (int i = 0; i < 300; i++)
        if (h[i] != 0) return false;
    return true;
}

int main() {
    char s1[80], s2[80];
    scanf("%s", s1);
    scanf("%s", s2);

    if (arePermutations(s1, s2)) {
        printf("true\n");
    } else {
        printf("false\n");
    }

    return 0;
}
